<%@ page pageEncoding="UTF-8" %>
<%@ page import="zth.*" %>
<%@ page import="zth.DBUtils" %>
<%@ page import="java.util.*" %>
<%@ include file="./head.jsp" %>
	<center>
	<span>search:</span>
	<form action="./login" method="POST" class=".diyi">
	<input type='text' name='search' value='search'>
	</form>
	<table  border="1">

    	<tr style="color:blue">
    	    <td>account</td>
    	    <td>password</td>
    	    <td>sex</td>
    	    <td>type</td>
    	 </tr>

<%
		String sql = "SELECT * FROM information ORDER BY account DESC";
		List<Information> informations = DBUtils.getInformation(sql);
		int lengthList=informations.size();
		for(Information information : informations)
		 { out.println("<tr>");
	          out.println("<td>"+information.getaccount()+"</td>"+"<td>"+information.getpassword()+"</td>"+"<td>"+information.getsex()+"</td>"+"<td>"+information.gettype()+"</td>");

	           out.println("<td>");
                out.println(String.format("<a href='./delete?account=%s'>删除</a>",information.getaccount()));
               		  out.println("</td>");
               		out.println("<td>");
                                    out.println(String.format("<a href='./edit?account=%s'>修改</a>",information.getaccount()));
                                   		  out.println("</td>");
               		   out.println("</tr>");
		    }

	%>


</table>
	</center>
    </body>
</html>
